from math import *

class Point:
    x = 0
    y = 0
    
    def __init__(self, list):
        self.x, self.y = list
        self.x = float(self.x)
        self.y = float(self.y)
        
    def __str__(self):
        string = " x = "+str(self.x)+",  y = "+str(self.y)
        return string
    
    def angle(self, other):
        dx = self.x - other.x
        dy = self.y - other.y
        d = self.dist(other)
        a = atan2(dy,dx)
        a = degrees(a)
        return a
    
    def dist(self, other):
        return sqrt(pow(self.x-other.x, 2) + pow(self.y-other.y, 2))

if __name__ == "__main__":
    p1 = Point([1,1])
    p2 = Point([1,1])
    p3 = Point([1,2])
    
    print p1.dist(p2)
    print p1.dist(p3)
    
    print p1.angle(p2)
    print p1.angle(p3)
    